package org.olo.jml.core.algorithm;

import org.apache.spark.SparkConf;
import org.apache.spark.api.java.JavaSparkContext;
import org.apache.spark.mllib.classification.NaiveBayes;
import org.apache.spark.mllib.regression.LabeledPoint;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Jange on 2016/7/20.
 */
public class CountTest {

    public static void main(String[] args) {
        List<String> strs = new ArrayList<String>();
        strs.add("asd");
        strs.add("xxx");
        strs.add("123");

        SparkConf sparkConf = new SparkConf().setAppName("Bayes").setMaster("local");
        JavaSparkContext sc = new JavaSparkContext(sparkConf);
        long cnt = sc.parallelize(strs).count();
        System.out.println(cnt);

//        RDD<LabeledPoint>
//        NaiveBayes.train()

    }

}
